// The Vue build version to load with the `import` command
// (runtime-only or standalone) has been set in webpack.base.conf with an alias.
import Vue from 'vue'
import App from './App'
import router from './router'
import axios from 'axios'

import { Header, Button, Swipe, SwipeItem, Spinner, Loadmore, MessageBox, Field, Toast, Search } from 'mint-ui'
Vue.component(Header.name, Header)
Vue.component(Button.name, Button)
Vue.component(Swipe.name, Swipe)
Vue.component(SwipeItem.name, SwipeItem)
Vue.component(Spinner.name, Spinner)
Vue.component(Loadmore.name, Loadmore)
Vue.component(Field.name, Field)
Vue.component(Search.name, Search)
Vue.prototype.$MessageBox = MessageBox
Vue.prototype.$Toast = Toast

Vue.config.productionTip = false

Vue.prototype.$ajax = axios
axios.defaults.withCredentials = true
axios.defaults.timeout = 8000
axios.defaults.headers['Content-Type'] = 'application/json'
axios.defaults.baseURL = 'https://www.gztang.cn'

/* eslint-disable no-new */
new Vue({
  el: '#app',
  router,
  components: { App },
  template: '<App/>'
})
